<?php

//	$picfilename=@$_GET["picfilename"];
//	file_put_contents("test.log","\n picfilename: ".$picfilename."\n", FILE_APPEND);
//	$filename=dirname(__FILE__). "\\pictures\\".$picfilename;
	$filename=@$_GET["picfilename"];
//	file_put_contents("test.log","\n filename: ".$filename."\n", FILE_APPEND);
	
	$size = @getimagesize($filename);
//	file_put_contents("test.log","\n filesize: ".$size."\n", FILE_APPEND);
	$fp = @fopen($filename, "rb");
	if ($size && $fp) 
	{
		header("Content-type: {$size['mime']}");
		fpassthru($fp);
		exit;
	} else 
	{
		echo "照片不存在。";// error
	}
	exit(0);
	
?> 